<h1>Nette\Collections\ArrayList test</h1>

<pre>
Adding Jack
Adding Mary
Adding foo
InvalidArgumentException: Item must be 'Person' object.

Adding Jack using []
Adding foo using []
InvalidArgumentException: Item must be 'Person' object.

(array):
array(3) {
  0 => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
  1 => object(Person) (1) {
    "name" private => string(4) "Mary"
  }
  2 => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
}

join() via extension method:
string(16) "Jack, Mary, Jack"

undeclared method:
MemberAccessException: Call to undefined method ArrayList::test().

Adding Larry using insertAt()
bool(TRUE)

Adding Larry using insertAt()
bool(TRUE)

Adding Larry using insertAt()
ArgumentOutOfRangeException: 

(array):
array(5) {
  0 => object(Person) (1) {
    "name" private => string(5) "Larry"
  }
  1 => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
  2 => object(Person) (1) {
    "name" private => string(4) "Mary"
  }
  3 => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
  4 => object(Person) (1) {
    "name" private => string(5) "Larry"
  }
}

Contains Jack?
bool(TRUE)

Contains Mary?
bool(TRUE)

Contains foo?
bool(FALSE)

Contains #-1?
bool(FALSE)

Contains #0?
bool(TRUE)

Contains #5?
bool(FALSE)

Getting #-1
ArgumentOutOfRangeException: 

Getting #0
object(Person) (1) {
  "name" private => string(5) "Larry"
}

Removing Larry
bool(TRUE)

Removing Larry second time
bool(TRUE)

Removing using unset
ArgumentOutOfRangeException: 

Removing using unset
indexOf Jack:
int(0)

indexOf Mary:
bool(FALSE)

Count: 2
Count: 2
Get Interator:
0 => My name is Jack
1 => My name is Jack
Clearing
Construct from array
InvalidArgumentException: Item must be 'Person' object.

Construct from array II.
array(3) {
  0 => object(Person) (1) {
    "name" private => string(4) "Jack"
  }
  1 => object(Person) (1) {
    "name" private => string(4) "Mary"
  }
  2 => object(ArrayObject) (0) {
  }
}

Construct as readonly
bool(TRUE)

Adding Jack using []
NotSupportedException: Collection is read-only.

Adding Jack using insertAt
NotSupportedException: Collection is read-only.

Removing using unset
NotSupportedException: Collection is read-only.

Changing using []
NotSupportedException: Collection is read-only.

